home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / tlp4v11c / docu / tgdsupp.txt < prev    next >
Encoding:
Text File  |  1994-05-15  |  5.5 KB  |  185 lines

  1. tgdsupp.obj function summary:
  2. =============================
  3.  
  4. This list contains UNIX-like summaries for the routines that
  5. are currently contained in tgdsuppx.obj.
  6.  
  7. tgdsuppx.obj is for use with the tgdlp4xx.obj ModeX graphics
  8. driver. It is not a stand alone module. The system requirements
  9. for tgdsuppx.obj are the same as for tgdlp4xx.obj (see
  10. tgdlp4.txt).
  11.  
  12. tgdsuppc.obj is compiled for the COMPACT memory model.
  13. This means that all calls to procedures must be declared as
  14. NEAR while pointers to data are all FAR.
  15. tgdsuppl.obj is compiled for the LARGE memory model. In this
  16. model all calls to procedures as well as all pointers to data
  17. are to be declared as FAR.
  18.  
  19. tgdsuppx.obj expects all parameters to be passed using C
  20. calling conventions. The C calling mechanism is described in
  21. tgdlp4.txt.
  22.  
  23.  
  24. bitmap far *newbitmap(uword xsize,uword ysize);
  25. allocate memory for a bitmap and a bitmap structure and
  26. initialize previously allocated bitmap structure
  27.  
  28. FUNCTION:
  29. This routine allocates conventional memory for a bitmap and
  30. the matching bitmap structure. It also initializes the bitmap
  31. structure.
  32. Note: the memory allocated for the bitmap itself is not
  33. cleared. This procedure may be used before calling
  34. tgdlp4xx.obj's getbitmap().
  35.  
  36. INPUTS:
  37. xsize,ysize: size of the bitmap in pixels for which memory
  38.          should be allocated. The minimal size is (1,1) -
  39.          reserving memory for a bitmap with only one pixel.
  40.  
  41. RESULT:
  42. bitmap *yourbitmap: pointer to the bitmap structure or 0 if
  43.             there was not enough free conventional
  44.             memory.
  45.  
  46. BUGS:
  47. none known
  48.  
  49. SEE ALSO:
  50. freebitmap()
  51. tgdlp4.txt: getbitmap()
  52.  
  53.  
  54. void freebitmap(bitmap far *yourbitmap);
  55. free bitmap and bitmap structure memory
  56.  
  57. FUNCTION:
  58. Use freebitmap() to free all memory previously allocated with
  59. newbitmap().
  60.  
  61. INPUTS:
  62. *yourbitmap: pointer to a bitmap structure returned by
  63.          newbitmap().
  64.  
  65. RESULT:
  66. none
  67.  
  68. BUGS:
  69. none known
  70.  
  71. SEE ALSO:
  72. newbitmap()
  73.  
  74.  
  75. spriteinc far *newsprite(word collxpos,word collypos,uword collxsize,uword collysize,spritemap far *spritedef);
  76. allocate memory for a sprite incarnation structure and
  77. initialize the structure
  78.  
  79. FUNCTION:
  80. tgdlp4xx.obj cannot work directly with the spritemap structure
  81. supplied by lp4suppx.obj's readsc() function. To handle a
  82. sprite tgdlp4xx.obj needs a sprite incarnation structure which
  83. can be generated by this procedure. All you need to create
  84. the sprite incarnation structure is to load a sprite animation
  85. using readsc() and then passing a pointer to the spritemap
  86. structure along with your user-defined sprite collision
  87. rectangle parameters to this routine. newsprite() then creates
  88. the sprite incarnation structure and returns a pointer to it
  89. or 0 if there was not enough memory left for creation of the
  90. structure.
  91. A user-defined sprite collision rectangle in principle works
  92. like this: If you call tgdlp4xx.obj's ucollspr() routine the
  93. user sprite collision rectangle of the sprite passed to this
  94. routine will be tested against all other user sprite collision
  95. rectangles of all other sprites for overlapping. If two
  96. rectangles overlap ucollspr() will recognize this as a
  97. sprite-sprite collision.
  98. To define a user sprite collision rectangle pass the position
  99. of the upper left edge of it - which is expected to be
  100. relative from the upper left edge of the sprite - in the
  101. collxpos, collypos variables. Pass the (x,y) size of the
  102. rectangle in the (collxsize,collysize) variables. A (x,y) size
  103. of (0,0) means the rectangle has a size of one pixel.
  104.  
  105. INPUTS:
  106. collxpos, collypos: x,y position of the top left edge of the
  107.             user-defined sprite collision rectangle
  108.             relative to the top left edge of the
  109.             sprite.
  110. collxsize, collysize: x,y size of the user sprite collision
  111.               rectangle. A size of (0,0) means the
  112.               sprite collision rectangle has the size
  113.               of one pixel.
  114. *spritedef: pointer to a spritemap structure which can be
  115.         obtained by calling lp4suppx.obj's readsc()
  116.         function.
  117.  
  118. RESULT:
  119. spriteinc *yoursprite: pointer to the sprite incarnation
  120.                structure or 0 if there was not enough
  121.                free memory to create the structure.
  122.  
  123. BUGS:
  124. none known
  125.  
  126. SEE ALSO:
  127. freesprite()
  128. lp4supp.txt: readsc()
  129. tgdlp4.txt: ucollspr(), addspr()
  130.  
  131.  
  132. void freesprite(spriteinc far *yoursprite);
  133. free sprite incarnation structure
  134.  
  135. FUNCTION:
  136. To free the memory which was previously allocated by
  137. newsprite() for a sprite incarnation structure you can use
  138. this routine. Before freeing the sprite incarnation structure
  139. make sure that the sprite is removed from the sprite display
  140. list. To delete a sprite from the display list use the
  141. following function call sequence: offspr(), refreshspr(),
  142. removespr(). All these functions are contained in tgdlp4xx.obj.
  143. I recommend to call freesprite() before calling lp4suppx.obj's
  144. freesc() for freeing the rest of the sprite structures if a
  145. sprite is no longer needed.
  146.  
  147. INPUTS:
  148. *yoursprite: pointer to a sprite incarnation structure
  149.          returned by newsprite()
  150.  
  151. RESULT:
  152. none
  153.  
  154. BUGS:
  155. none known
  156.  
  157. SEE ALSO:
  158. newsprite()
  159. tgdlp4.txt: offspr(), refreshspr(), removespr()
  160. lp4supp.txt: freesc()
  161.  
  162.  
  163. void framewait(uword frames);
  164. wait for a number of frames
  165.  
  166. FUNCTION:
  167. This procedure waits the number of frames requested. Usually
  168. a VGA card will produce 70 frames a second in the physical
  169. resolution modes offered by tgdlp4xx.obj.
  170. WARNING: This function may not be called when the vrclk
  171. library is in use at the same time.
  172.  
  173. INPUTS:
  174. frames: number of frames to wait.
  175.  
  176. RESULT:
  177. none
  178.  
  179. BUGS:
  180. none known
  181.  
  182. SEE ALSO:
  183. tgdlp4.txt: waittof()
  184.  
  185.